Skip to content

Test new color tokens#1887

Open
nhironaka wants to merge 1 commit intomainfrom
nhironaka/new_color_tokens
Open

Test new color tokens#1887
nhironaka wants to merge 1 commit intomainfrom
nhironaka/new_color_tokens

Conversation

@nhironaka
Copy link
Copy Markdown
Contributor

@nhironaka nhironaka commented Apr 24, 2026

Summary

Screenshots (if appropriate):

Testing approaches


Note

Medium Risk
Medium risk because it changes core design-token primitives/aliases (impacting colors across themes) and alters the token build pipeline with a new OKLCH preprocessor and updated source globs.

Overview
Switches color primitives to new OKLCH-based palettes (neutral, action, positive, negative, warning, info) and rewires color aliases to reference these groups instead of the legacy gray/blue/red/green/purple primitives.

Adds color-primitives-map(.dark).json to preserve backward-compatible gray/blue/... token names via references, updates Style Dictionary configs/tests/snapshots to include the map, and introduces an oklch()→hex preprocessor so JS/Figma outputs can still run through colorRgb.

Adds new shadow tokens and commits old_tokens/ JSON files for reference.

Reviewed by Cursor Bugbot for commit ee2d0bf. Bugbot is set up for automated code reviews on this repo. Configure here.


Open in Devin Review

@nhironaka nhironaka requested review from a team as code owners April 24, 2026 14:09
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2026

⚠️ No Changeset found

Latest commit: ee2d0bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nhironaka nhironaka force-pushed the nhironaka/new_color_tokens branch from e286ca8 to e332956 Compare April 24, 2026 14:12
devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

@nhironaka nhironaka force-pushed the nhironaka/new_color_tokens branch from e332956 to 72c583a Compare April 24, 2026 16:33
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 24, 2026

yarn add https://pkg.pr.new/@launchpad-ui/components@1887.tgz
yarn add https://pkg.pr.new/@launchpad-ui/icons@1887.tgz
yarn add https://pkg.pr.new/@launchpad-ui/tokens@1887.tgz

commit: ee2d0bf

devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

@nhironaka nhironaka force-pushed the nhironaka/new_color_tokens branch from 72c583a to 80d0c73 Compare April 27, 2026 13:42
cursor[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View 8 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing convert-oklch preprocessor on vscode platform causes broken color values in tokens.json

The vscode platform (lines 224-238) uses transforms.colorRgb which relies on tinycolor2 for color parsing, but does not have the convert-oklch preprocessor registered. The code's own comment at packages/tokens/src/build.ts:72-75 explicitly states: "Style Dictionary's built-in colorRgb transform uses tinycolor2, which does not support the oklch() color format." The convert-oklch preprocessor was created for exactly this reason and correctly added to the js platform (line 200), but was omitted from the vscode platform. Since the source includes tokens/color-primitives.default.json (which now contains oklch values), and the vscode file has no filter excluding color tokens, all oklch primitive tokens will pass through colorRgb unconverted. tinycolor2 will either leave them as raw oklch strings or produce incorrect RGB values (e.g., rgb(0, 0, 0)). The resulting dist/tokens.json is explicitly exported in package.json and consumed by external tools.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread packages/tokens/src/build.ts
@nhironaka nhironaka force-pushed the nhironaka/new_color_tokens branch 2 times, most recently from 9e6a21d to c8016c8 Compare April 27, 2026 16:06
cursor[bot]

This comment was marked as resolved.

@nhironaka nhironaka force-pushed the nhironaka/new_color_tokens branch from c8016c8 to ee2d0bf Compare April 27, 2026 16:33
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ee2d0bf. Configure here.

buildPath: 'dist/',
transforms: [transforms.nameKebab, transforms.attributeColor],
preprocessors: ['extensions'],
preprocessors: ['convert-oklch', 'extensions'],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing oklch preprocessor on vscode platform

High Severity

The vscode platform uses transforms.colorRgb (which relies on tinycolor2) but doesn't include preprocessors: ['convert-oklch']. The js and figma platforms both correctly include this preprocessor for the same reason. Since tinycolor2 cannot parse oklch() values, color tokens in the tokens.json output will either be raw oklch strings or silently converted to black, producing incorrect colors for VS Code consumers.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ee2d0bf. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant